<template>
  <div>
    <el-button
      type="primary"
      @click="getFocus">点击 评论回复</el-button>
    <sendReplay
      v-model="value"
      :focus-type.sync="show"
      @send="send" />
  </div>
</template>

<script>
import sendReplay from '@/components/sendReplay.vue'

export default {
  name: 'App',
  components: {
    sendReplay
  },
  data() {
    return {
      value: '',
      show: false
    }
  },
  watch: {
    value() {
      console.log(this.value)
    }
  },
  methods: {
    getFocus() {
      this.value = null
      this.show = true
    },
    send() {
      console.log(this.value)
      this.show = false
    }
  }
}
</script>
